<template>
  <view class="seg-group">
    <uni-section :title="sectionName" type="line" v-if="sectionName !== ''" >
      <uni-group mode="card">
        <view>
          <view class="seg-content-group-header" v-if="groupName !== ''">
            {{groupName}}
          </view>
          <slot/>
        </view>
      </uni-group>
    </uni-section>
    <uni-group mode="card" v-else>
      <view>
        <view class="seg-content-group-header" v-if="groupName !== ''">
          {{groupName}}
        </view>
        <slot/>
      </view>
    </uni-group>
  </view>
</template>

<script>
import UniSection from "../uni-section/uni-section";
import UniGroup from "../uni-group/uni-group";
export default {
  name: "segContentGroup",
  components: {UniGroup, UniSection},
  props: {
    sectionName: {
      default: "",
      type: String
    },
    groupName: {
      default: "",
      type: String
    }
  }
}
</script>

<style scoped>
  .seg-group {
    margin: 1px;
  }
</style>
